import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI)
import 'default-passive-events'

// 引css样式
import "./assets/css/reset.css"
import "./components/index"
import "./filters/index"
Vue.config.productionTip = false

// 前置守卫
router.beforeEach((to,from,next)=>{
  if(to.path=="/"){
    next()
    return
  }
  if(sessionStorage.getItem("user")){
    next()
  }
})


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
